package main

import (
	"server_cluster/common/logger"
	"server_cluster/logic/game_config"
	"server_cluster/logic/sharemem"
)

func main() {
	game_config.InitConfig()
	logger.InitLogger("stopserver", game_config.GetConfig().LogLevel)
	defer logger.CloseLogger()
	shmid := sharemem.GetShm()
	if shmid <= 0 {
		panic("get myshm fail.")
	}
	var myshm = sharemem.MyShm
	if myshm.Status == 1 {
		myshm.Status = 2
		logger.Info("stop command ok.")
	} else {
		logger.Error("game server is not running.failed Status = %v", myshm.Status)
	}
}
